<!-- 顶部导航栏模板 -->
<template>
  <div class="bg-slate-800/90 p-4 flex justify-between items-center">
    <div
      class="flex items-center gap-1 cursor-pointer"
      @click="menuService.toggleState"
    >
      <el-icon
        :size="20"
        v-if="menuService.close.value"
        ><Expand
      /></el-icon>
      <el-icon
        :size="20"
        v-else
        ><Fold
      /></el-icon>
      <Breadcrumb/>
    </div>

    <div class="flex justify-center items-center">
      <section class="mr-5">姓名: {{ user.userInfo.Name }}</section>
      <el-button
        type="success"
        @click="utils.user.logout"
        >退出</el-button
      >
    </div>
  </div>
</template>

<script setup lang="ts">
import menuService from "@/composables/menu";
import utils from "@/utils";
import { CacheEnum } from "@/enum/cacheEnum";
import Breadcrumb from "@/components/Common/breadcrumb.vue";

const user = utils.store.get(CacheEnum.TOKEN_NAME);
</script>

<style scoped></style>
